<template>
  <div class="app-container home">
    <div class="page-content  " style="max-height: 100%;">
      <div style="padding: 0px 60px;">
        <div class="ant-spin-nested-loading">
          <div class="ant-spin-container">
            <div class="flex">
              <div class="homeItem" style="width: 100%;">
                <div class="home-title flex-between">
                  <div class="font-18 font-700">实时概况</div><a> 刷新概况</a>
                </div>
                <div class="homeItem-child">
                  <div class="ant-row">
                    <div class="ant-col ant-col-6">
                      <div class="color7F7F7F">今日支付订单数</div><span class="font-28 font-700 font4A89F0">0</span>
                      <div>昨日：4</div>
                    </div>
                    <div class="ant-col ant-col-6">
                      <div class="color7F7F7F">今日支付金额（元）</div><span class="font-28 font-700 font4A89F0">0.00</span>
                      <div>昨日：0</div>
                    </div>
                    <div class="ant-col ant-col-6">
                      <div class="color7F7F7F">下单件数</div><span class="font-28 font-700 font4A89F0">0</span>
                        <!-- <span class="color-70B603 font-12">100%</span> -->
                      <div>昨日：4</div>
                    </div>
                    <div class="ant-col ant-col-6">
                      <div class="color7F7F7F">待发货</div>
                      <div class="font-28 font-700 font4A89F0">187</div>
                      <a>立即查看</a>
                    </div>
                  </div>
                  <div class="ant-row margin-top">
                    <div class="ant-col ant-col-6">
                      <div class="color7F7F7F">新增会员数</div><span class="font-28 font-700 font4A89F0">3</span>
                      <div>昨日：2</div>
                    </div>
                    <div class="ant-col ant-col-6">
                      <div class="color7F7F7F">累积会员数</div><span class="font-28 font-700 font4A89F0">34577</span>
                    </div>
                    <div class="ant-col ant-col-6">
                      <div class="color7F7F7F">今日提现总额（元）</div><span class="font-28 font-700 font4A89F0">0.00</span>
                      <div>昨日：0</div>
                    </div>
                    <div class="ant-col ant-col-6">
                      <div class="color7F7F7F">未完成售后</div>
                      <div class="font-28 font-700 font4A89F0">0</div>
                      <a>立即查看</a>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="homeItem">
          <div class="home-title ">
            <div class="font-18 font-700">运营数据(按日)</div>
          </div>
          <div class="flex-between homeItem-child">
            <div class="flex alignCenter">
              <div ref="echartsRef" style="width: 800px; height: 400px;"></div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup name="Index">
import { onMounted } from 'vue';
import * as echarts from 'echarts';
 
 const echartsRef = ref(null);
const version = ref('3.8.9')

function goTarget(url) {
  window.open(url, '__blank')
}
onMounted(() => {
  const chart = echarts.init(echartsRef.value);
  const option = {
    title: {
      text: ''
    },
    tooltip: {},
    xAxis: {
      data: ["2025-07-01","2025-07-02","2025-07-03","2025-07-04","2025-07-05","2025-07-06"]
    },
    yAxis: {},
    series: [{
      name: '销量',
      data: [5, 20, 36, 10, 10, 20],
      type: 'line'
    }]
  };
  chart.setOption(option);
});
</script>

<style scoped lang="scss">
.home {
  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }

  hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eee;
  }

  .col-item {
    margin-bottom: 20px;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  font-family: "open sans",
  "Helvetica Neue",
  Helvetica,
  Arial,
  sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;

  ul {
    list-style-type: none;
  }

  h4 {
    margin-top: 0px;
  }

  h2 {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
  }

  p {
    margin-top: 10px;

    b {
      font-weight: 700;
    }
  }

  .update-log {
    ol {
      display: block;
      list-style-type: decimal;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0;
      margin-inline-end: 0;
      padding-inline-start: 40px;
    }
  }
}

.page-body .page-content {
    flex: 1 1;
    max-height: calc(100% - 70px);
    overflow-y: auto;
    padding: 10px 10px 10px 25px;
    position: relative;
}
.ant-spin-nested-loading {
    position: relative;
}
.ant-spin-container {
    position: relative;
    transition: opacity .3s;
}
.homeItem {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 5px #e8e8e8;
    margin-bottom: 10px;
    padding: 20px;
}
.home-title {
    border-left: 3px solid #4a89f0;
    line-height: 22px;
    margin-left: 30px;
    padding-left: 10px;
}
.homeItem-child {
    margin: 10px 80px 0;
    text-align: center;
}
.ant-row, .ant-row:after, .ant-row:before {
    display: flex;
}
.ant-row {
  padding:30px 0;
    flex-flow: row wrap;
    min-width: 0;
}
.ant-col-6 {
    display: block;
    flex: 0 0 25%;
    max-width: 25%;
}
.ant-col {
    max-width: 100%;
    min-height: 1px;
    position: relative;
}
:deep(.app-main){
  background: rgb(245, 245, 251);
}
</style>
